/*
 *  settings.h
 *  phaseit3d
 *
 *  Created by Anton Barty on 4/9/10.
 *  Copyright 2010 all rights reserved.
 *
 */


#define cbufsize 1024

class cSettings {

public:
	void	setDefaults(void);
	void	parseCommandLineArguments(int, char**);
	void	parseConfigFile(char*);
	void	writeInitialLogFile(void);
	void	writeFinalLogFile(void);


public:
	char	diffractionDataFile[cbufsize];
	char	supportDataFile[cbufsize];
	char	guessDataFile[cbufsize];
	char	outdir[cbufsize];
	char	logfile[cbufsize];

	int		nthreads;
	long	niterations;

	
	// File handling
	int		dvZeroInCorner;
	float	dvMissingData;
	int		dvAmplitude;
	int		supportInCorner;
	int		guessInCorner;
	
	// Phase retrieval
	int		prAlgorithm;
	float	prBeta;
	float	prEpsilon;
	float	prNoisefloor;
	long	prRandomSeed;
	long	prErrorReductionFreq;
	
	// Shrinkwrap
	int		sw;
	long	swStart;
	long	swStop;
	long	swFreq;
	float	swStartRadius;
	float	swEndRadius;
	float	swThresh0;
	float	swThresh;
	
	// FFTW
	int		fftwSpeedTest;
	int		fftwSanityCheck;
	long	fftwSpeedTestN;
	
	
	// Running sum
	int		runningSum;
	long	rsStart;
	long	rsFreq;
	
	// Saving
	long	savefreq;


	
private:
	void	parseConfigTag(char*, char*);


};


